package com.wuliang.generate.bean.vo.datasource;

import com.google.gson.annotations.Expose;
import com.wuliang.generate.common.core.basic.BaseVo;
import com.wuliang.generate.bean.entities.datasource.DatasourceColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author WuLiang
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "前后端交互参数——字段")
public class DatasourceColumnVo extends BaseVo<DatasourceColumn> {

    @Expose
    @ApiModelProperty(name = "tableId", value = "字段主键")
    private Integer datasourceColumnId;

    @Expose
    @ApiModelProperty(name = "tableId", value = "归属于哪张表")
    private Integer tableId;

    @Expose
    @ApiModelProperty(name = "columnName", value = "字段名称")
    private String columnName;

    @Expose
    @ApiModelProperty(name = "columnDefaultValue", value = "字段默认值")
    private String columnDefaultValue;

    @Expose
    @ApiModelProperty(name = "columnNullable", value = "是否可以为空(0: 是; 1：否)")
    private Integer columnNullable;

    @Expose
    @ApiModelProperty(name = "columnType", value = "字段类型")
    private String columnType;

    @Expose
    @ApiModelProperty(name = "columnLength", value = "字段最大长度")
    private Integer columnLength;

    @Expose
    @ApiModelProperty(name = "columnCharter", value = "字段值编码")
    private String columnCharter;

    @Expose
    @ApiModelProperty(name = "columnCollate", value = "编码引擎")
    private String columnCollate;

    @Expose
    @ApiModelProperty(name = "columnKey", value = "什么类型的key")
    private String columnKey;

    @Expose
    @ApiModelProperty(name = "columnExtra", value = "附属选项")
    private String columnExtra;

    @Expose
    @ApiModelProperty(name = "columnComment", value = "字段说明")
    private String columnComment;
}
